<?php
$directory = dirname(__FILE__) . '/locale/';

$locale = "en_US.utf8";

if (isset($_REQUEST['locale']))
{
    $locale = $_REQUEST['locale'];
}

putenv("LC_ALL=$locale");
putenv("LANG=$locale");

setlocale(LC_ALL, NULL);
setlocale(LC_ALL, $locale);

$domain = 'messages';
bindtextdomain($domain, $directory);
textdomain($domain);
?>

<a href="?locale=en_US.utf8">en US</a> |
<a href="?locale=en_GB.utf8">en GB</a> |
<a href="?locale=de_DE.utf8">de</a> |
<a href="?locale=fr_FR.utf8">fr</a> |
<a href="?locale=ru_RU.utf8">ru</a> |

<br /><hr /><br />
<h1><?php echo _("hello_world.title"); ?></h1>
<ul>
    <li /><?php echo _("content.hi"); ?>
    <li /><?php echo _("content.antenna"); ?>
    <li /><?php echo _("content.parking"); ?>
    <li /><?php echo _("content.truck"); ?>
</ul>

<br /><br /><br /><hr /><br />
<small>created by: <a href="http://www.translatekarate.com?example" target="_blank">TranslateKarate.com - online gettext editor</a></small>

